#ifndef RV32I_SC_INSTFETCHER_H
#define RV32I_SC_INSTFETCHER_H

#include <queue>
#include <map>
#include "systemc.h"
#include "tlm.h"
#include "tlm_utils/simple_initiator_socket.h"

class InstFetcher : public sc_module {
public:
    SC_HAS_PROCESS(InstFetcher);

    InstFetcher(sc_module_name name);
    ~InstFetcher();

    tlm_utils::simple_initiator_socket<InstFetcher> initiator_socket;

    void
    sendInst();

private:
    tlm::tlm_response_status gp_status;
    unsigned char *icache;
    uint32_t pc;
    uint32_t pc_max;
};


#endif //RV32I_SC_INSTFETCHER_H
